# encoding: utf-8

import sys
import glob
import os

if __name__ == "__main__":
    if len(sys.argv)<3:
        print "workingDir and pattern must be given"
    else:
        work_dir = sys.argv[1]
        pattern = sys.argv[2]
        files_gen = [item for item in glob.glob(work_dir + os.sep + pattern)]
        files_list = ','.join(files_gen)
        sys.stdout.write(files_list)